package cn.com.guanying.android.ui;

import java.util.ArrayList;

import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.AdapterView.OnItemClickListener;
import cn.com.guanying.R;
import cn.com.guanying.android.ui.adapter.MovieItemAdapter;
import cn.com.guanying.javacore.v11.models.FilmInfo;

public class ToBePlayMovieActivity extends BaseActivity implements OnItemClickListener{

	private ListView mMovieListView;
	private MovieItemAdapter movieAdapter;
	public void doInit() {
		movieAdapter = new MovieItemAdapter(this);
		ArrayList<FilmInfo> a = new ArrayList<FilmInfo>();
		FilmInfo mi = new FilmInfo();
		a.add(mi);
		a.add(mi);
		a.add(mi);
		a.add(mi);
		a.add(mi);
		a.add(mi);
		a.add(mi);
		movieAdapter.setmMovieList(a);
		mMovieListView.setAdapter(movieAdapter);
		mMovieListView.setOnItemClickListener(this);
	}

	public void doFindView() {
		mMovieListView = (ListView)findViewById(R.id.list_tobeplay_movie);
	}

	protected int getContentView() {
		return R.layout.activity_tobeplay_movie;
	}
	
	@Override
	protected void onLogicEventUI(Object sender, int eventId, Object[] datas) {

	}

	@Override
	public void onItemClick(AdapterView<?> parent, View view, int position,long id) {
		Intent intent = new Intent(this,ToBePlayMovieDetailsActivity.class);
		startActivity(intent);
	}

}
